package wiring.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanWiringTest {
	public static void main( String[] args ) throws PerformanceException {
		/*
		Performer perform = new Juggler();
		perform.performer();
		*/
		
		ApplicationContext ctx 
			= new ClassPathXmlApplicationContext( "wiring/bean/ApplicationContext.xml" );
		
		SelectionTest st = (SelectionTest) ctx.getBean( "selection" );
		st.disp();
		
		// Performer perform = (Performer) ctx.getBean( "duet" );
		// perform.perform();
		
		// Auditorium auditorium1 = (Auditorium) ctx.getBean( "auditorium" );
		// Auditorium auditorium2 = (Auditorium) ctx.getBean( "auditorium" );
						
		/*
		 * singleton / prototype
		Performer perform1 = (Performer) ctx.getBean( "duke" );
		perform1.perform();
		
		System.out.println( perform );
		System.out.println( perform1 );
		*/
		
	}
}






